import http from '@/service'

export function selectRoles(params: any) {
	return http.get({
		url: '/system/role/list',
		params
	})
}

export function insertRole(data: any) {
	return http.post({
		url: '/system/role/insert',
		data
	})
}

export function selectRoleRoutes(params: { id: number }) {
	return http.get({
		url: '/system/role/routelist',
		params
	})
}

export function updateRole(data: any) {
	return http.post({
		url: '/system/role/update',
		data
	})
}

export function deleteRole(id: number) {
	return http.delete({
		url: '/system/role/delete/' + id
	})
}
